// -------------------------------------------------
// ZED Kit
// -------------------------------------------------
//   File Name: shell.mm
//      Author: Ziming Li
//     Created: 2024-06-01
// -------------------------------------------------
// Copyright (C) 2024 MingYang Software Technology.
// -------------------------------------------------

#import "./shell.hpp"

#import <AppKit/AppKit.h>

namespace zed {

bool gui_shell::open_url(const char* url)
{
    NSString* s = [NSString stringWithUTF8String: url];
    NSURL* u = [NSURL URLWithString: s];
    return [[NSWorkspace sharedWorkspace] openURL: u];
}

} // namespace zed
